package top.whysu.study.thinkinjava.chapter8.polymorphism.ex1;

/**
 * 自行车
 */
public class Cycle {

    private String name = "Cycle";

    private int sum = 2;
    public void travel(Cycle cycle) {
        System.out.println("Cycle.ride() " + cycle);
    }

    public int wheels() {
        return sum;
    }

    @Override
    public String toString() {
        return this.name;
    }
}